package com.lesson9.decorator.ex;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/10/2 10:21
 */
public class WaterCar extends SuperCar
{
    public WaterCar(ICar iCar)
    {
        super(iCar);
    }

    @Override
    public void move()
    {
        super.move();
        swim();//在原有移动的基础上，装饰了一个swim的功能
    }

    private void swim()
    {
        System.out.println("---水里游");
    }
}
